﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Visualization.aspx.cs" Inherits="SensorNetworkUI.Visualization" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:DropDownList ID="DropDownList1" runat="server" 
        DataSourceID="SqlDataSource2" DataTextField="sensor_name" 
        DataValueField="sensor_id" 
        onselectedindexchanged="DropDownList1_SelectedIndexChanged" 
        AutoPostBack="True">
    </asp:DropDownList>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:sensorsConnectionString %>" 
        SelectCommand="SELECT * FROM [sensor]"></asp:SqlDataSource>
    <br />
    <asp:Chart ID="Chart1" runat="server" DataSourceID="SqlDataSource1" Width="651px" 
        >
        <Series>
            <asp:Series ChartType="Line" Name="Series1" XValueMember="reading_date" 
                YValueMembers="sensor_reading">
            </asp:Series>
        </Series>
        <ChartAreas>
            <asp:ChartArea Name="ChartArea1">
            </asp:ChartArea>
        </ChartAreas>
    </asp:Chart>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:sensorsConnectionString %>" 
        SelectCommand="SELECT [sensor_reading], [reading_date] FROM [Reading]">
    </asp:SqlDataSource>
</asp:Content>
